-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: propagate TLS errors as failures #73
Conversation
b99bece
to
f443e93
Compare
0d92753
to
f04fcce
Compare
@hellais rebased, ready to review |
internal/tlssession/tlssession.go
Outdated
// TODO(ainghazal): pass the failure to the tracer too. | ||
|
||
if errors.Is(err, ErrBadCA) { | ||
ws.sessionManager.Failed <- session.NewFailure(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why you need to wrap this in a special Failure
struct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intention was to be able to extend it in the future for different types of failures, but you're right YAGNI for now; I'll refactor to just pass the error for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I asked a clarifying question about the need to wrap stuff in a custom Failure struct, but otherwise LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐳
Description
For integration into probe-cli, we need to propagate any errors raised during TLS handshake.
While working on this commit, a few other improvements were made:
Checklist
ARCHITECTURE.md
.